#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from flask import g
from flask_wtf import Form
from flask_wtf.file import FileField, FileRequired, FileAllowed
from wtforms import TextAreaField, SelectField, PasswordField, RadioField, TextField, HiddenField, \
    IntegerField
from wtforms.validators import DataRequired, Regexp, EqualTo, InputRequired


class SiteInfo(Form):
    url = TextField('网站网址', default='http://120.25.145.142')
    name = TextField('网站名称', default='')
    logo = TextField('网站LOGO图片', default='logo.jpg')
    title = TextField('首页TITLE标题', default='')
    desc = TextAreaField('简介', default='便捷的自主设计、个人专属的私人定制')

class AlipayInfo(Form):
    email = TextField('邮箱', default='')
    pid = TextField('合作者身份PID', default='')
    key = TextField('安全校验码key', default='')

class ProductInfo(Form):
    name = TextField('产品名称', default='')
    url = TextField('产品链接', default='')
    image = TextField('产品图片', default='')
    year_income = TextField('年度收益', default='')
    win_odds = TextField('胜算率', default='')
    month_income = TextField('当月收益', default='')
    once_average_income = TextField('平均每次盈利', default='')
    max_return = TextField('最大回撤', default='')
    once_average_lost = TextField('平均每次亏损', default='')



class ModalTypeInfo(Form):
    name = TextField('产品名称', default='')


class TouguProductInfo(Form):
    name = TextField('产品名称', default='')
    type_id = SelectField('模型类别', coerce=int, validators=[
        DataRequired('不能为空')])
    excel_file = FileField('表格文件', default='')


class ZhuzibaoInfo(Form):
    image =TextField('产品图片', default='')
    desc = TextAreaField('描述',default='')
    price1 =TextField('价格1', default='10W')
    price2 =TextField('价格2', default='20W')
    price3 =TextField('价格3', default='50W')